home *** CD-ROM | disk | FTP | other *** search
/ Champak 43 / Vol 43.iso / games / superdog.swf / scripts / DefineSprite_65_en10 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-06-25  |  821 b   |  42 lines

  1. stop();
  2. onEnterFrame = function()
  3. {
  4.    if(_parent._parent.pauses == false)
  5.    {
  6.       if(acted == false)
  7.       {
  8.          this.gotoAndPlay("attack");
  9.          acted = true;
  10.       }
  11.       if(acted == true)
  12.       {
  13.          act_i++;
  14.          if(act_i >= 90)
  15.          {
  16.             act_i = 0;
  17.             acted = false;
  18.          }
  19.       }
  20.       if(this._x <= 0 and dix == false)
  21.       {
  22.          dix = true;
  23.       }
  24.       else if(this._x >= 580 and dix == true)
  25.       {
  26.          dix = false;
  27.       }
  28.       if(dix == false and atking == false)
  29.       {
  30.          this._x -= spd;
  31.          long += spd;
  32.          this._xscale = 100;
  33.       }
  34.       else if(dix == true and atking == false)
  35.       {
  36.          this._x += spd;
  37.          long += spd;
  38.          this._xscale = -100;
  39.       }
  40.    }
  41. };
  42.